package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 订单明细类
 */
@Data
@ApiModel(value = "订单明细类")
@TableName("t_orderinfo")
public class OrderInfoBean {
    /**订单明细id*/
    @ApiModelProperty(hidden = true)
    @TableId(value = "pk_orderInfoId",type = IdType.AUTO)
    private Integer id;
    /**订单id*/
    @ApiModelProperty(value = "订单id")
    @TableField("fk_orderId")
    private Integer orderId;
    /**商品id*/
    @ApiModelProperty(value = "商品id")
    @TableField("fk_goodsId")
    private Integer goodsId;
    /**购买数量*/
    @ApiModelProperty(value = "购买数量")
    @TableField("oi_num")
    private Integer num;
    /**价格*/
    @ApiModelProperty(value = "价格")
    @TableField("oi_price")
    private double price;

    public OrderInfoBean() {
    }

    public OrderInfoBean(Integer orderId, Integer goodsId, Integer num, double price) {
        this.orderId = orderId;
        this.goodsId = goodsId;
        this.num = num;
        this.price = price;
    }

    @Override
    public String toString() {
        return "\nOrderInfoBean{" +
                "id=" + id +
                ", orderId=" + orderId +
                ", goodsId=" + goodsId +
                ", num=" + num +
                ", price=" + price +
                '}';
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getOrderId() {
        return orderId;
    }

    public void setOrderId(Integer orderId) {
        this.orderId = orderId;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }
}
